/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.lottery.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 微信抽奖助手-用户参与情况Entity
 * @author 黄茂展
 * @version 2019-07-31
 */
public class Participation extends DataEntity<Participation> {
	
	private static final long serialVersionUID = 1L;
	private String openid;		// 用户唯一标识
	private String activityId;		// 活动编号
	private Date joinTime;		// 参与时间
	private String prizeclassId;		// 奖品类别编号
	private String addressId;		// 收货地址编号
	private WechatUser wechatUser;
	private Activity activity;
	private WechatAddress wechatAddress;

	public Participation() {
		super();
	}

	public Participation(String id){
		super(id);
	}

	@Length(min=1, max=64, message="用户唯一标识长度必须介于 1 和 64 之间")
	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}
	
	@Length(min=1, max=64, message="活动编号长度必须介于 1 和 64 之间")
	public String getActivityId() {
		return activityId;
	}

	public void setActivityId(String activityId) {
		this.activityId = activityId;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getJoinTime() {
		return joinTime;
	}

	public void setJoinTime(Date joinTime) {
		this.joinTime = joinTime;
	}
	
	@Length(min=0, max=64, message="奖品类别编号长度必须介于 0 和 64 之间")
	public String getPrizeclassId() {
		return prizeclassId;
	}

	public void setPrizeclassId(String prizeclassId) {
		this.prizeclassId = prizeclassId;
	}
	
	@Length(min=0, max=64, message="收货地址编号长度必须介于 0 和 64 之间")
	public String getAddressId() {
		return addressId;
	}

	public void setAddressId(String addressId) {
		this.addressId = addressId;
	}

	public WechatUser getWechatUser() {
		return wechatUser;
	}

	public void setWechatUser(WechatUser wechatUser) {
		this.wechatUser = wechatUser;
	}

	public Activity getActivity() {
		return activity;
	}

	public void setActivity(Activity activity) {
		this.activity = activity;
	}

	public WechatAddress getWechatAddress() {
		return wechatAddress;
	}

	public void setWechatAddress(WechatAddress wechatAddress) {
		this.wechatAddress = wechatAddress;
	}
	
}